package com.sjsu.aws.db;

/**
 * 
 * @author Deepali Pawar
 *
 */
import com.amazonaws.services.dynamodb.model.ListTablesResult;
import com.amazonaws.services.dynamodb.model.ScanResult;

public interface TableOperation {
	/**
	 * 
	 * @param tableName
	 * @param row
	 * @return
	 */
	public boolean insertItem(String tableName, TableRow row);
	
	/**
	 * 8
	 * 
	 * @param tableName
	 * @param row
	 * @return
	 */
	public boolean UpdateDeleteItem(String tableName, TableRow row);
	
	/***
	 * 
	 * @param tableName
	 * @param row
	 * @return
	 */
	public boolean UpdatePutItemWithN(String tableName, TableRow row);
	
	/***
	 * 
	 * @param tableName
	 * @param row
	 * @return
	 */
	public boolean deleteItem(String tableName, TableRow row);
	
	/**
	 * @param tableName
	 * @param keyName
	 * @param keyType
	 * @return
	 */
	public boolean createTable(String tableName, String keyName, String keyType);
	
	/***
	 * 
	 * @param tableName
	 * @param keyName1
	 * @param keyType1
	 * @param keyName2
	 * @param keyType2
	 * @return
	 */
	public boolean createTableWithMultipleKeys(String tableName,
	        String keyName1, String keyType1, String keyName2, String keyType2);
	
	/**
	 * 
	 * @param tableName
	 * @return
	 */
	public boolean deleteTable(String tableName);
	
	/**
	 * @param tableName
	 * @return
	 */
	public boolean UpdateTable(String tableName);
	
	/**
	 * 
	 * @param tableName
	 * @param criteria
	 * @return
	 */
	public ScanResult queryTable(String tableName, QueryCriteria criteria);
	
	/**
	 * 
	 * @param tableName
	 * @param row
	 * @return
	 */
	public boolean UpdatePutItem(String tableName, TableRow row);
	
	/**
	 * 
	 * @param tableName
	 * @param row
	 * @return
	 */
	public boolean deleteItemWithCondition(String tableName, TableRow row);
	
	/**
	 * 
	 * @param tableName
	 * @param row
	 * @return
	 */
	public boolean deleteItemWithConditionAndMultipleKeys(String tableName,
	        TableRow row);
	
	/**
	 * 
	 * @return
	 */
	public ListTablesResult listTables();
	
	/**
	 * 
	 * @param tableName
	 * @return
	 */
	public ScanResult queryTableWithNoCondition(String tableName);
}
